export const SHOW_TYPE_VALUE = '单值'
export const SHOW_TYPE_ENUM = '枚举'
export const SHOW_TYPE_ARRAY = '数组'

// 显示类型 
export const showTypeOptions = [
  {value: SHOW_TYPE_VALUE, label: '单值'},
  {value: SHOW_TYPE_ENUM, label: '枚举'},
  {value: SHOW_TYPE_ARRAY, label: '数组'},
]

export const DATA_TYPE_WSTRING = 'WSTRING'
export const DATA_TYPE_INT8 = 'INT8'

// 数据类型
export const dataTypeOptions = [
  // {value: 'INT8', label: 'INT8', min: -128n, max: 127n },
  // {value: 'UINT8', label: 'UINT8', min: 0n, max: 255n },
  // {value: 'INT16', label: 'INT16', min: -32768n, max: 32767n },
  // {value: 'UNT16', label: 'UNT16',  min: 0n, max: 65535n },
  // {value: 'INT32', label: 'INT32', min: -2147483648n, max: 2147483647n },
  // {value: 'UINT32', label: 'UINT32', min: 0n, max: 4294967295n },
  // {value: DATA_TYPE_WSTRING, label: DATA_TYPE_WSTRING},
  // {value: 'DOUBLE', label: 'DOUBLE', min: -1.7976931348623157e+308, max: 1.7976931348623157e+308 },
  // {value: 'INT64', label: 'INT64', min: -9223372036854775808n, max: 9223372036854775807n },
  // {value: 'UINT64', label: 'UINT64', min: 0n, max: 18446744073709551615n }

  {value: DATA_TYPE_INT8, label: DATA_TYPE_INT8, min: BigInt(-128).toString(), max: BigInt(127).toString() },
  {value: 'UINT8', label: 'UINT8', min: BigInt(0).toString(), max: BigInt(255).toString() },
  {value: 'INT16', label: 'INT16', min: BigInt(-32768).toString(), max: BigInt(32767).toString() },
  {value: 'UNT16', label: 'UNT16',  min: BigInt(0).toString(), max: BigInt(65535).toString() },
  {value: 'INT32', label: 'INT32', min: BigInt(-2147483648).toString(), max: BigInt(2147483647).toLocaleString() },
  {value: 'UINT32', label: 'UINT32', min: BigInt(0).toString(), max: BigInt(4294967295).toString() },
  {value: DATA_TYPE_WSTRING, label: DATA_TYPE_WSTRING},
  {value: 'DOUBLE', label: 'DOUBLE', min: -1.7976931348623157e+308, max: 1.7976931348623157e+308 },
  {value: 'INT64', label: 'INT64', min: BigInt('-9223372036854775808').toString(), max: BigInt('9223372036854775807').toString() },
  {value: 'UINT64', label: 'UINT64', min: BigInt(0), max: BigInt('18446744073709551615').toString() }
]

export const flowStepTypeOptions = [
  {value: '', label: '一般协议'},
  {value: '1', label: '硬件配置'},
  {value: '2', label: '总线配置'},
  {value: '3', label: '协议配置'},
  {value: '4', label: '共享配置'},
  {value: '5', label: '观察者配置'}
]

export const setGetOptions = [
  {value:'set', label:'SET'},
  {value: 'get', label: 'GET'}
]

export const trueFlaseOptions = [
  {value: '1', label: 'TRUE'},
  {value: '0', label: 'FLASE'}
]